package forum.client.ui.events;

import java.awt.Component;
import forum.client.ui.SearchHandler;

public class SearchHitsEvent implements SearchEvent {

	private Component m_comp;
	private String m_searchResultsView;
	
	public SearchHitsEvent(String searchResultsView, Component comp) {
		m_searchResultsView = searchResultsView;
		m_comp = comp;
	}
	
	@Override
	public void respondToEvent(SearchHandler handler) {
		if (m_comp != null) {
			m_comp.setEnabled(true);
		}
		
		handler.displayResults(m_searchResultsView, 0, 10);
	}

}
